//后端请求总域名，以后域名更改只需要改这里即可
const BASE_URL = "http://springboot.web-framework-juanjuan.1715789810050447.cn-hangzhou.fc.devsapp.net/juanjuan/";

// 阻止滚动
function publicPreventScrolling() {
    document.body.scrollTop = 0; // For Safari
    document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
    document.body.classList.add('prevent-rolling');
}

//允许滚动
function publicAllowScrolling() {
    document.body.classList.remove('prevent-rolling');
}

// 检查组件检验是否通过
function checkInput(inputEl) {
    if (inputEl.classList.contains('input-radio-box')) {
        return checkInputRadiotBox(inputEl);
    } else if (inputEl.classList.contains('input-select-box')) {
        return checkInputSelectBox(inputEl);
    } else if (inputEl.classList.contains('input-text-box')) {
        return checkInputTextBox(inputEl);
    } else if (inputEl.classList.contains('upload-file-box')) {
        return checkUploadFileBox(inputEl);
    } else if (inputEl.classList.contains('input-checkbox-box')) {
        return checkInputCheckboxtBox(inputEl);
    }
    else {
        // 未知组件
        alert('未知组件！');
        return false;
    }
}